02. Exercise 1: Calculating Log Returns

Objective: Calculate the raw profit and log returns for a given set of stock prices, and demonstrate the additive and symmetric properties of these.

Instructions: Assume you have the following daily closing prices of a stock over a week: [100, 105, 103, 107, 106].

  1. Calculate the raw profit, raw returns, and log returns for each day relative to the previous day.

    • Formula for Raw Profit: sell_price - buy_price
    • Formula for Raw Returns: sell_price / buy_price
    • Formula for Log Returns: ln(sell_price / buy_price) = ln(sell_price) - ln (buy_price)
  2. Perform the following tasks in order:

    1. Calculate the raw profit, raw returns, and log returns for the entire period (i.e. buy at t=0 and sell at t=4)
    2. Demonstrate and explain how:
      1. The full-period raw profit relates to the additive and symmetrical properties of the individual raw profit from part (1).
      2. The full-period log return relates to the additive and symmetrical properties of the individual log returns from part (1).
      3. The full-period raw return relates to the lack of additive property of the individual raw returns from part (1).